/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercises.day02.pt03;

/**
 *
 * @author (jaice)
 * @version 0.1 (may 28, 2012)
 * 
 * a. Create a simple console-based Java application which will allow tellers 
 * of Earnest Bank to use a collection-based data source.  The application should 
 * have the following specifications:
 * 
i. A method which allows the tellers to store registration details 
 * (registration id, first name, last name, address, account type, annual income, 
 * and phone number) in a collection.  Write this method passing a class as a
 * parameter.  Overload this method to accept a comma-separated String as a 
 * parameter.  The overloaded method should be able to tokenize the CSV and
 * store it as part of the collection.  Use the following as test: 
 * "9, Silas, Marner, Evergreen Terrace, Savings, 350000, 09885832";
 * 
ii. A method which will allow tellers to search by first name and
 * return a list of result set;
 * 
iii. A method which will allow tellers to retrieve all registrations 
 * by annual income.  Overload this method to accept the annual income and a 
 * boolean value to include incomes below or above the supplied annual income.

Code a main application which will test the methods.  Format the output as necessary.
 */
public class BankMain {

    public static void main(String args[]) {



        BankTransaction bt = new BankTransaction();

        bt.addCustomer("9, Silas, Marner, Evergreen Terrace, Savings, 350000, 09885832");
        bt.addCustomer("1, Doe, John, Manila, Savings, 10500, 7777777");
        bt.addCustomer("1, Doe, John, Manila, Savings, 20000, 7777777");

//        for(BankCustomer bc :  bt.returnAll())
//        {
//            System.out.println(bc);
//        }
//       
//              for(BankCustomer bc :  bt.searchName("Doe"))
//        {
//            System.out.println(bc);
//            
//        }  

        for (BankCustomer bc : bt.returnByIncome()) {
            System.out.println(bc);

        }



    }
}
